<%@ Page Language="C#" %>
<script runat="server">
 protected void Page_Init(object sender, EventArgs e)
{
  if (Request.QueryString["actionName"] == "Regenerate")
  {
   if (Session["captchaCharactersTypes"] != null)
  {              
     string text = Tal.CaptchaControl.TextManager.GenerateText();
   string path = Tal.CaptchaControl.ImageManager.WriteImage(text);
  Session["captcha_image_text"] = text;
  Response.Write(path);
  Response.End();
  }
  }
 }
</script>